package com.biwin.module.orm.starter.config;

import com.biwin.module.orm.starter.factory.BasicRepositoryFactoryBean;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

import javax.annotation.PostConstruct;

/**
 * TODO
 *
 * @author biwin
 * @since
 */
@Configuration
@EnableJpaRepositories(
        basePackages = {"com.biwin.module.orm.api.repository"},
        repositoryFactoryBeanClass = BasicRepositoryFactoryBean.class// 指定自己的工厂类
)
@ComponentScan(basePackages = "com.biwin.module.orm.starter")
public class JpaAutoConfiguration {
    private Log log = LogFactory.getLog(this.getClass());

    @PostConstruct
    public void init() {
        log.info("开始加载 BiWin - JPA 模块...");
    }

}
